/* eslint-disable jsx-a11y/anchor-is-valid */
/*
 * @Author: Zhouhai 497675647@qq.com
 * @Date: 2022-11-16 15:56:01
 * @LastEditors: Zhouhai 497675647@qq.com
 * @LastEditTime: 2022-11-25 12:46:56
 */
/* eslint-disable @typescript-eslint/no-unused-vars */
import ResizeTable from '@/components/ResizeTable';
import { SysRolePostDomain } from '@/type.d/system/rolePost';
import { ProColumns } from '@ant-design/pro-components';
import React, {  } from 'react'

export type PostRoleProps = {
    dataSources?: SysRolePostDomain[],
}


const PostRole: React.FC<PostRoleProps> = (props) => {


    /**
     * 列表字段配置
     */
    const columns: ProColumns<SysRolePostDomain>[] = [
        {
            title: '角色标识',
            dataIndex: 'roleKey',
            valueType: 'text',
            align: 'left',
            width: '50',
        },
        {
            title: '角色名称',
            dataIndex: 'roleName',
            valueType: 'text',
            align: 'left',
            width: '50',
        },
        {
            title: '职责',
            dataIndex: 'postId',
            valueType: 'text',
            align: 'left',
            width: '50',
            hideInTable: true
        },
        {
            title: '角色所属公司',
            dataIndex: 'corpName',
            valueType: 'text',
            align: 'left',
            width: '50',
            hideInTable: true
        },
        {
            title: '主键',
            dataIndex: 'rolePostId',
            valueType: 'text',
            align: 'left',
            width: '50',
            hideInTable: true
        },
        {
            title: '授权人',
            dataIndex: 'createBy',
            valueType: 'text',
            align: 'left',
            width: '50',
        },
        {
            title: '授权时间',
            dataIndex: 'createTime',
            valueType: 'dateTime',
            align: 'left',
            width: '50',
        },
        {
            title: '修改人',
            dataIndex: 'updateBy',
            valueType: 'text',
            align: 'left',
            width: '50',
            hideInTable: true
        }
    ];


    return (
        <ResizeTable<SysRolePostDomain>
            dataSource={props.dataSources}
            columns={columns}
            cardBordered
            pagination={false}
            revalidateOnFocus={false}
            options={false}
            rowSelection={{
            }}
        >
        </ResizeTable>
    )
}
export default PostRole;